﻿<!-- _meta 作为公共模版分离出去 -->
<!DOCTYPE HTML>
<html>
<head>
	<meta charset="utf-8">
	<meta name="renderer" content="webkit|ie-comp|ie-stand">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
	<meta http-equiv="Cache-Control" content="no-siteapp" />
	<link rel="Bookmark" href="/admin/imgs/logo.ico"/>
	<link rel="Shortcut Icon" href="/admin/imgs/logo.ico"/>
	<link rel="stylesheet" type="text/css" href="static/h-ui/css/H-ui.min.css" />
	<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/H-ui.admin.css" />
	<link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css" />
	<link rel="stylesheet" type="text/css" href="static/h-ui.admin/skin/default/skin.css" id="skin" />
	<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/style.css" />
	<title>系统后台</title>
	<style type="text/css">
		ul.cl li { margin: 0 10px; }
	</style>

	<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript" src="static/h-ui/js/H-ui.js"></script>
	<script type="text/javascript" src="js/admin.js"></script>
	<script type="text/javascript">
		var info = getLoginInfo();
		console.log(info);
		(function(){
			if (!info) {
				window.location.href = 'login.html';
			}
		})();
	</script>
</head>
<body>
<header class="navbar-wrapper">
	<div class="navbar navbar-fixed-top">
		<div class="container-fluid cl">
			<img src="/admin/imgs/logo.ico" style="padding:10px;width:25px;height:25px;float:left;">
			<a class="logo navbar-logo f-l mr-10 hidden-xs" href="javascript:;">佰傲嘉主站</a>
		</div>
		<nav id="Hui-userbar" class="nav navbar-nav navbar-userbar hidden-xs">
		<ul class="cl">
				<li><a href="https://lxw7.w.eolink.com/home/api_studio/inside/api/detail?apiID=47710621&groupID=1717461&projectHashKey=eVIDfPV6c34d81f4253fd4355150698c98e2b756c0d5a01&spaceKey=lxw7" target="_blank">接口文档</a></li>
				<!--<li>登录人:</li>-->
				<li class="dropDown dropDown_hover">
					<a href="#" class="dropDown_A">
						<span id="loginName">登录人:admin</span> &nbsp;
						<i class="Hui-iconfont">&#xe6d5;</i>
					</a>
					<ul class="dropDown-menu menu radius box-shadow">
						<li><a href="javascript:;" onclick="logout()">退出</a></li>
					</ul>
				</li>
			</ul>
		</nav>
	</div>
</header>
<aside class="Hui-aside">
	<div class="menu_dropdown bk_2">
		<dl id="menu-system">
			<dt>
				<i class="Hui-iconfont">&#xe62e;</i> 后台
				<i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i>
			</dt>
			<dd style="display:block;">
				<ul>
					<li>
						<a href="javascript:;" onclick="toAdmin()" class="ali">
							管理员
						</a>
					</li>
				</ul>
			</dd>
			<dt>
				<i class="Hui-iconfont">&#xe62e;</i> 前台
				<i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i>
			</dt>
			<dd style="display:block;">
				<ul id="leftMenu">
					<!--<li>-->
					<!--<a href="javascript:;" onclick="" class="ali">-->
					<!--菜单管理-->
					<!--</a>-->
					<!--</li>-->
					<!--<li>-->
					<!--<a href="javascript:;" onclick="" class="ali">-->
					<!--语言管理-->
					<!--</a>-->
					<!--</li>-->
				</ul>
			</dd>
		</dl>
	</div>
</aside>
<section class="Hui-article-box">
	<iframe id="iframe" src="main.html" frameborder="no" style="width:100%; height:100%; min-height:500px;"></iframe>
</section>

<span id="pop"></span>
</body>
</html>


<script type="text/javascript">
	(function(){
		adminInfo();
		leftMenu();
	})();
	//获取登录信息
	function adminInfo(){
		$('#loginName').html('登录人：'+info.adminName+'('+info.roleName+')');
	}
	//管理员页面
	function toAdmin(){
		$('#iframe')[0].src = '/admin/admin.html';
	}
	//退出登录
	function logout(){
		setLogout();
		window.location.href = 'login.html';
	}
	//左侧菜单
	function leftMenu(){
		var d = [
			{id:1,title:'菜单管理',link:'front'},
			{id:2,title:'语言管理',link:'lang'},
		];
		var h = '', i, id, title, link;
		for (i=0; i<d.length; i++) {
			id = d[i].id; title =d[i].title;
			link = d[i].link;
			h += '<li>';
			h += '<a href="javascript:;" onclick="setFrame('+id+')">';
			h += title;
			h += '<b style="margin-right:10px;float:right;" class="bli" id="bli'+id+'"></b>';
			h += '</a>';
			h += '<input type="hidden" id="link'+id+'" value="'+link+'"/>';
			h += '</li>';
		}
		$('#leftMenu').html(h);
	}
	//切换菜单的视图
	function setFrame(id){
		var link = $('#link'+id).val();
		if (link=='') { pop({msg:'开发中'}); return }
		$('#iframe')[0].src = '/admin/'+link+'.html';
		$('.ali').css('color','#888');
		$('#ali'+id).css('color','#0088CC');
		$('.bli').html('');
		$('#bli'+id).html('√');
	}
</script>